import React from 'react';

import BaseAction from '../common/BaseAction';
import Constants from '../../common/Constants';

export default class ActivityRequestFollowAction extends BaseAction{
  constructor() {
      super();

      this.moduleType = Constants.MODULE_TYPE.ACTIVITY;
      this.name = "ActivityRequestFollowAction";
  }

  call(caller, data) {
      this._baseCall(caller, data);
      this.caller.setState({
        follow_state: 1,
      })
  }

  //updateData{tag, 状态:0初始化,1请求中,2成功,3失败, 数据}
  finish(data, isSucceed) {
    var follow_state = 0;
    if(isSucceed) {
      follow_state = 2;
    }
    else {
      follow_state = 3;
    }
    this.caller.setState({
      follow_state: follow_state,
    })
  }
}
